You are here: Statements and Functions > View
Syntax samples
VIEW "view name"
VIEW "Cell5"
VIEW "View10"
Use this statement to change the view in the Layout window from within your logic. Once the view has been defined from the View menu in main menu, you can use it in the logic.
All logic.
Components
<view name>
The name of the view defined in the Views dialog. Enclose the name in quotation marks.
Example
You are giving a presentation on the use of simulation for airport design. Two hours into the model run, you want to zoom in on the baggage area to show the activity there. Three hours into the simulation, you want to zoom out to show the entire airport..You are giving a presentation to management on the factory floor using simulation. Two hours into the simulation, you want to zoom in on a particular cell in the factory to show the activity there. Three hours into the simulation, you want to zoom out to show the entire factory.
To do this, define two views called Cell1 and Factory using the Views editor on the View menu. Define an independent subroutine and call it in the initialization logic using the ACTIVATE statement. Enter the following logic in the subroutine:
INT X=1
WHILE X=1 DO
BEGIN
IF CLOCK(hr) = 2 THEN VIEW "Cell1"
IF CLOCK(hr) = 3 THEN VIEW "Factory"
WAIT 1 hr
END